<!-- 导航URL -->
<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-md-12">
		<ol class="breadcrumb">
			<li><a>主页</a></li>
			<li><a>信用卡还款</a></li>
			<li class="active"><strong>订单类型修改</strong></li>
		</ol>
	</div>
</div>

<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn" ng-app
	 ng-controller="typeEditCtrl">
	<form class="form-horizontal" id="form1">
		<div class="row">
			<div class="col-lg-12">
				<div class="tabs-container tab_other">
					<div class="panel-body ibox float-e-margins">
						<div class="ibox-title">
							<h5>基本资料</h5>
						</div>
						<div class="ibox-content">
							<div class="form-group">
								<label class="col-sm-2 control-label">订单类型：</label>
								<div class="col-sm-2">
									<input type="text" class="form-control" ng-model="repayType.repayPlanInfo.planName" disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">服务开关：</label>
								<div class="col-sm-2">
									<select class="form-control" ng-model="repayType.repayPlanInfo.status" ng-options="x.value as x.text for x in statusSelect">
										<option value="" selected>全部</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">服务关闭提示语：</label>
								<div class="col-sm-5">
									<input type="text" class="form-control" ng-model="repayType.repayPlanInfo.closeTip"><br/>
									<p>（服务关闭时必填）</p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">计划服务起止时间:</label>
								<div class="col-sm-5">
									<input type="text" class="form-control" ng-model="repayType.repayPlanInfo.allowBeginTime" style="width:auto;display:inline-block;">
									~
									<input type="text" class="form-control" ng-model="repayType.repayPlanInfo.allowEndTime" style="width:auto;display:inline-block;">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">每日还款笔数范围:</label>
								<div class="col-sm-5">
									<input type="text" class="form-control" ng-model="repayType.repayPlanInfo.allowDayMinNum" style="width:auto;display:inline-block;">
									~
									<input type="text" class="form-control" ng-model="repayType.repayPlanInfo.allowDayMaxNum" style="width:auto;display:inline-block;">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">还款目标金额范围:</label>
								<div class="col-sm-5">
									<input type="text" class="form-control" ng-model="repayType.repayPlanInfo.allowRepayMinAmount" style="width:auto;display:inline-block;">
									~
									<input type="text" class="form-control" ng-model="repayType.repayPlanInfo.allowRepayMaxAmount" style="width:auto;display:inline-block;">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">首笔交易金额范围:</label>
								<div class="col-sm-5">
									<input type="text" class="form-control" ng-model="repayType.repayPlanInfo.allowFirstMinAmount" style="width:auto;display:inline-block;">
									~
									<input type="text" class="form-control" ng-model="repayType.repayPlanInfo.allowFirstMaxAmount" style="width:auto;display:inline-block;">
								</div>
							</div>
						</div>
					</div>
					<div class="panel-body ibox float-e-margins">
						<div class="ibox-title">
							<h5>通道路由权重比例</h5>
							<input type="button" class="btn" style="margin-left: 20px;background-color: #0d8ddb;color: white"
								   ng-click="showModal()" value='新增通道'/>
							<!--<input type="button" class="btn" style="margin-left: 20px;background-color: #0d8ddb;color: white"
								   ng-click="relieve()" value='删除通道'/>-->
						</div>
						<!--数据列表-->
						<table id="dataList" class="table table-bordered table-striped table-hover dataTable"
							   style="width: 450px;margin-left: 150px">
							<thead>
							<tr>
								<th style="text-align: center">通道名称</th>
								<th style="text-align: center">路由比例</th>
								<th style="text-align: center;width: 60px">操作</th>
							</tr>
							</thead>
							<tbody ng-repeat="entity in repayType.repayChannelList">
							<tr>
								<!--<td><input  type="checkbox" ng-click="updateSelection($event,entity.id)"></td>-->
								<td>{{entity.channelName}}</td>
								<td><input type="text" class="form-control" ng-model="entity.percent"></td>
								<td>
									<button type="button" class="btn btn-default" title="删除" ng-click="deleteTableRow($index)" ><i class="fa fa-trash-o"></i> 删除</button>
								</td>
							</tr>
							</tbody>
						</table>
					</div>
					<div class="col-lg-12 bgff">
						<div class="col-sm-12">
							<div class="col-lg-3"></div>
							<div class="col-sm-6">
								<button class="btn btn-primary btn-mr20" type="button" ng-click="update()" ng-disabled="submitting">提交</button>
								<button class="btn btn-primary4" type="button" ng-click="back()" >返回</button>
							</div>
						</div>
					</div>
					<div style="height:30px;"></div>
				</div>
			</div>


			<form class="form-horizontal" id="form2" name="addChannel" novalidate>
				<div id="addChannel" class="modal fade" tabindex="-1" role="dialog">
					<div class="modal-dialog" style="width: 500px">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal">
									&times;</button>
								<h3 class="modal-title">新增通道</h3>
							</div>
							<div class="modal-body">
								<div class="form-group">
									<label class="col-sm-3 control-label">通道名称：</label>
									<div class="col-sm-5">
										<select class="form-control" ng-model="entity.id" ng-options="x.id as x.channelName for x in channelsSelect">
											<option value="" selected="selected">请选择通道</option>
										</select>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-5 control-label"></label>
									<div class="col-lg-12" align="center">
										<button class="btn btn-primary6" type="button" ng-click='addChannel()'>确认</button>
										<button class="btn btn-primary8" type="button" ng-click='cancel()'>取消</button>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</form>

		</div>
	</form>

</div>
